package com.qztech.sdk.model.dao;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;

import com.qztech.sdk.model.entities.DelayChannel;

/**
 * @author:zhanghb
 * @date:2019/3/22
 * @email:2573475062@qq.com
 **/
@Dao
public interface DelayDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(DelayChannel delayChannel);

    @Update
    void update(DelayChannel delayChannel);

    @Delete
    void delete(DelayChannel delayChannel);

    @Query("Delete from delay_channel where pid=:pid")
    void delete(String pid);

    @Query("SELECT * FROM delay_channel WHERE pid=:pid")
    DelayChannel getDelayChannel(String pid);
}
